package yfdc.douyin.download.network;
import org.jetbrains.annotations.Nullable;
import yfdc.douyin.download.Utils;
public final class Result<T> {
    public final boolean isSuccess;
    @Nullable
    public final T data;
    public Result(final boolean _success, @Nullable final T _data) {
        super();
        this.isSuccess = _success;
        this.data = _data;
    }
    @SuppressWarnings("all")
    public static <T> void callBack(final boolean success, @Nullable final T data, @Nullable final NetWorkCallBack netWorkCallBack) {
        if (netWorkCallBack != null) {
            try {
                netWorkCallBack.callback(new Result<T>(success, data));
            } catch (Throwable any) {
                Utils.logException(any, "CallBack");
            }
        }
    }
}
